<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<meta name="viewport" content="width=1000, initial-scale=1.0, maximum-scale=1.0">
	    <!-- Loading Bootstrap -->
	    <link href="./Public/Admin/Flat/dist/css/vendor/bootstrap.min.css" rel="stylesheet">
	    <!-- Loading Flat UI -->
	    <link href="./Public/Admin/Flat/dist/css/flat-ui.css" rel="stylesheet">
	    <link href="./Public/Admin/Flat/docs/assets/css/demo.css" rel="stylesheet">
	    <link rel="shortcut icon" href="./Public/Admin/Flat/img/favicon.ico">
	    <!-- HTML5 shim, for IE6-8 support of HTML5 elements. All other JS at the end of file. -->
	    <!--[if lt IE 9]>
	      <script src="dist/js/vendor/html5shiv.js"></script>
	      <script src="dist/js/vendor/respond.min.js"></script>
	    <![endif]-->
	</head>
	<body>
		<table class="table table-hover">
			<tr class="active">
				<th>货品ID</th>
				{{foreach from="$data" value="$v"}}
					<th>{{$v['taname']}}</th>
				{{endforeach}}		
				<th>货号 </th>
				<th>库存</th>
				<th>操作</th>
			</tr>
			{{foreach from="$listData" value="$v"}}			
				<tr>
					<td>{{$v['glid']}}</td>
					{{foreach from="$v['value']" value="$value"}}
						<td>{{$value['gtvalue']}}</td>
					{{endforeach}}
					<td>{{$v['number']}}</td>
					<td>{{$v['inventory']}}</td>
					<td>         
						<a href="" class="btn btn-sm btn-warning">编辑</a>
						<a href="javascript:if(confirm('确定删除吗？')) location.href='{{U('del',array('glid'=>$v['glid'],'shop_goods_gid'=>$v['shop_goods_gid']))}}'" class="btn btn-sm btn-danger">删除</a>
					</td>
				</tr>
			{{endforeach}}
			<form action="" method="post">
				<tr>
					<td style="font-family: '微软雅黑'">添加货品</td>
					{{foreach from="$data" value="$v"}}
						<td>
							<div class="form-group">
								<!--<label for="twoselect">所属品牌</label>-->
								<select id="twoselect" name="gtid[]" class="form-control" >
									<option value="">请选择</option>
									{{foreach from="$v['value']" value="$value"}}
										<option value="{{$value['gtid']}}">{{$value['gtvalue']}}</option>
									{{endforeach}}
								</select>
							</div>	
						</td>
					{{endforeach}}	
					<!--<td>
						<div class="form-group">
							
							<select id="twoselect" name="shop_brand_bid" class="form-control" >
								<option value="">请选择</option>
								<option value="">1211111111</option>
							</select>
						</div>	
					</td>-->
					<td>
						<div class="form-group">
							<input  class="form-control" type="text" placeholder="请输入库货号"  name="number" >
						</div>
					</td>
					<td>
						<div class="form-group">
							<input  class="form-control" type="text" placeholder="请输入库存量"  name="inventory" >
						</div>
					</td>
					<td>
						<input type="hidden"  name="shop_goods_gid" value="{{$_GET['gid']}}"/>
						<button class="btn btn-primary btn-block" type="submit">保存添加</button>
					</td>					
				</tr>
				
			</form>
			
			
			
		</table>	

	</body>
</html>
